<template>
	<div  style="height: 100vh;width: 100vw;overflow-y: scroll;overflow-x: hidden;min-width: 1440px;" ref="scroll" class="wrapper">
		<div class="d1-3" id="top">
			<div style="width: 1440px;margin: auto;height: 90px;margin: auto;min-width: 1440px;">
				<div style="display: inline-block;width: 216px;line-height: 90px;height: 90px;vertical-align: middle;">
					<img src="../../img/header.png" style=" width: 216px;">
				</div>
				<div style="display: inline-block;width:1224px;height: 100%;">
					<ul class="ul1" v-for="(item,index) in $router.options.routes" :index="index+''" v-if="item.expert" style="width: 100%;">
						<li v-for="(item2,index2) in item.children" :index="item2.path" v-if="item2.expert" style="width: 7%;">
							<router-link :to="{path:item2.path}"
								:class="$route.path==item2.path?'is-active':'not-active'">{{item2.name}}</router-link>
						</li>
						<li style="width: 10%;" v-if="!userbolean"  v-show="true">
							<!-- <router-link to="/Signin"><i class="el-icon-user-solid"
									style="color: #ff7f50;margin-right: 3%;font-size: 20px;"></i>登录</router-link> -->
							<i class="el-icon-user-solid"
									style="color: #ff7f50;margin-right: 3%;font-size: 20px;"></i>
							<el-dropdown trigger="click" style="font-size: 15px;margin-left: 5px;">
								<span class="el-dropdown-link" style="cursor: pointer;">
									登录
									<i class="el-icon-caret-bottom el-icon--right"></i>
								</span>
								<el-dropdown-menu slot="dropdown">
									<el-dropdown-item class="clearfix" style="padding: 0;width:80px;">
										<span @click="toSigninx()" style="display: inline-block;width: 100%;text-align: center;">学生登录</span>
										<!-- <el-badge class="mark" /> -->
									</el-dropdown-item>
									<el-dropdown-item class="clearfix" style="padding: 0;width:80px;">
										<span @click="toSignin()" style="display: inline-block;width: 100%;text-align: center;">指导师登录</span>
										<!-- <el-badge class="mark" /> -->
									</el-dropdown-item>
								</el-dropdown-menu>
							</el-dropdown>
						</li>
						<li style="width: 9%;" v-if="userbolean">
							<i class="el-icon-user-solid" style="color: #ff7f50;font-size: 20px;"></i>
							<el-dropdown trigger="click" style="font-size: 15px;margin-left: 5px;">
								<span class="el-dropdown-link">
									{{user.nickName}}
									<i class="el-icon-caret-bottom el-icon--right"></i>
								</span>
								<el-dropdown-menu slot="dropdown">
									<el-dropdown-item class="clearfix" style="padding: 0;width:80px;">
										<span @click="logout()" style="display: inline-block;width: 100%;text-align: center;">退出登录</span>
										
										<el-badge class="mark" />
									</el-dropdown-item>
								</el-dropdown-menu>
							</el-dropdown>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<router-view class="section"></router-view>
		<el-backtop target=".wrapper" :visibility-height="300" :bottom="150" style="width: 120px;height: 50px;font-size: 20px;">
			<span style="font-size: 25px;">↑</span>回到顶部
		</el-backtop>
		<div class="div3" style="margin: auto;margin-top: 30px;">
			<div style="font-size: 12px;color: gray;display: inline-block;width: 1440px;border-bottom: 1px solid gray;line-height: 50px;height: 50px;text-align: left;">
				<a target="_blank" href="http://www.sneea.cn/" style="color: gray;">陕西省教育考试院</a> <a target="_blank" href="http://www.sneac.com/" style="margin-left: 20px;color: gray;">陕西招生考试信息网</a><a target="_blank" href="https://gaokao.chsi.com.cn/" style="margin-left: 20px;color: gray;">阳光高考|国家智慧教育公告服务平台</a><a target="_blank" href="https://yz.chsi.com.cn/" style="margin-left: 20px;color: gray;">中国研究生招生信息网</a>
			</div></br>
			<p style="color: gray;font-size: 12px;line-height: 20px;display: inline-block;text-align: left;width: 1440px;">
			<span style="display: inline-block;width: 74%;">
				门道生涯 | 你与更精彩的自己，只差一道门的距离！
				<span>联系电话：177 9120 5273（西安）、153 0917 5208（宝鸡）、130 9392 0312（汉中）、180 9124 4811（榆林）、181 9192 0705（渭南）</span>
			</span>	
			
			<span style="text-align: right;display: inline-block;width: 26%;">
				
					<span @click="togxb()" style="cursor: pointer;margin-left: 20px;">陕ICP备19005241号-2</span> 
					<img src="../../img/beian.png" style="line-height: 20px;height: 20px; display: inline-block;vertical-align:top;margin-left: 20px;"/>
				
					<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=61019002002070" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="" style="float:left;"/><p style="height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">陕公网安备 61019002002070号</p></a>
					
				</span>
			</p>
		</div>
	</div>
</template>
<script>
	import {
		request
	} from "../../util/request.js"
	import axios from 'axios'
	import VueResource from 'vue-resource'
	export default {
		data() {
			return {
				url:'https://beian.miit.gov.cn/',
				user: {
				},
				userbolean:false,
			}
		},
		methods: {
			togxb() {
			window.open(this.url)
			},
			toSignin(){
				this.$router.push({
					path:"/signin"
				})
			},
			toSigninx(){
				this.$router.push({
					path:"/signinx"
				})
			},
			logout(){
				// console.log("用户退出登录...")
				request({
					method: 'get',
					url: 'sysUser/logout'
				}).then(res => {
					if(res.code==null||res.code==0){
						sessionStorage.removeItem("satoken")
						sessionStorage.removeItem("user")
						this.userbolean=false
						// console.log("成功！")
					}
				})
				this.$store.commit('logout')
				this.user=null
				this.$router.push({ path: '/' });
				
			},
		},
	
	mounted() {
		
	},
	created() {
		const user = sessionStorage.getItem("user");
		this.user=JSON.parse(user)
		if(this.user!=null&&this.user.nickName!=null&&this.user.nickName!=""){
			this.userbolean=true
		}
	},
	}
</script>

<style>
	body::-webkit-scrollbar {display: none;}

	.d1-3 {
			width: 1440px;
			text-align: right;
			margin: 0 auto;
			align-items: center;
			border-bottom: 1px solid #e7eaed;
			min-width: 1440px;
		}
	.btnzf{
		width: 6.25rem;
		height: 1.875rem;
		border-radius: 0.3125rem;
		background-color: #ff7f50;
		color: white;border: none;
		margin-top: 3.125rem;
	}
	#app{
		position:absolute;
		top:0;
		right:0;
		bottom:0;
		left:0;
	}
			 html,body{height: 100%;width: 100%;}
	        .wrapper{display: flex;flex-direction: column;min-height: 100%;max-width: 100%;}
	        .d1-3{flex: 0;}
	        .section{flex: 1;min-width: 1440px;}
	        .div3{flex: 0;}
</style>
